package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.SpuSaveVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.SpuInfoEntity;

import java.util.Map;

/**
 * spu信息
 *
 * @author laisanshan
 * @email fromzero911@gmail.com
 * @date 2021-07-12 15:05:13
 */
public interface SpuInfoService extends IService<SpuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 新增商品
     *
     * @param spuSaveVo spu信息保存Vo
     */
    void saveSpuInfo(SpuSaveVo spuSaveVo);

    /**
     * 商品上架
     *
     * @param spuId 商品id
     */
    void up(Long spuId);

    /**
     * 通过skuId查询spu信息
     *
     * @param id skuId
     * @return spu信息
     */
    SpuInfoEntity getSpuInfoBySkuId(Long id);

}

